<?php

declare(strict_types=1);

namespace tests\Unit\stubs;

use app\service\notify\CreateNotifyService;

class DummyNotifyService extends CreateNotifyService
{
    /**
     * 收集到的通知消息
     *
     * @var array<int, array{targets: array, type: string, data: array}>
     */
    public array $messages = [];

    public function add($targetPairs, $type, $data, array $options = []): void
    {
        $this->messages[] = [
            'targets' => $targetPairs,
            'type' => $type,
            'data' => $data,
            'options' => $options,
        ];
    }
}
